<template>
  <div class="app">
    <h1>我是App组件</h1>
    <h2>我的agree是：{{agree}}</h2>
    <br>
    <Child :tongyi="agree" :updateTongyi="updateAgree"/>
  </div>
</template>

<script>
  import Child from './components/Child.vue'

  export default {
    name:'App',
    components:{Child},
    data() {
      return {
        agree:false
      }
    },
    methods:{
      updateAgree(value){
        this.agree = value
      }
    }
  }
</script>

<style>
  .app {
    background-color: skyblue;
    padding: 20px;
    border-radius: 10px;
    box-shadow:  0 0 10px black;
    font-size: 30px;
  }
  input {
    width: 20px;
    height: 20px;
  }
</style>